import React, { Component } from 'react'
import bus from "../Bus/bus";

export default class Child4 extends Component {
  render() {
    return (
      <div>
        姓名  <input ref="username"/>
        <button onClick={()=>{
           // alert(this.refs.username.value)
           bus.$emit("getValue",this.refs.username.value);
        }}>把数据给兄弟</button>
      </div>
    )
  }
}
